package com.leyou.common.exception;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;

/**
 * 乐优公共异常
 */
@Getter
public class LyException extends RuntimeException{
    private Integer status;
    public LyException(Integer status, String msg) {
        super(msg);
        this.status = status;
    }

    //规定好返回的内容
    public LyException(ExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMessage());
        this.status = exceptionEnum.getStatus();
    }
}


